package org.kl.bf.service.basic;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author hqm
 * @CreateTime 2014-3-13 下午9:11:30
 */
// Spring Bean的标识.
@Component
// 默认将类中的所有public函数纳入事务管理.
@Transactional
public class NotifyFileService {

	/*private NotifyFileDao notifyFileDao;

	public NotifyFile getNotifyFile(String guid) {
		return notifyFileDao.findOne(guid);
	}

	public void saveNotifyFile(NotifyFile entity) {
		notifyFileDao.save(entity);
	}

	public void deleteNotifyFile(String guid) {
		notifyFileDao.delete(guid);
	}

	public List<NotifyFile> getAllNotifyFile() {
		return notifyFileDao.findAll();
	}

	public Page<NotifyFile> getUserNotifyFile(Map<String, Object> searchParams, int pageNumber, int pageSize, String sortType,
			String orderType) {
		PageRequest pageRequest = CRUDUtils.buildPageRequest(pageNumber, pageSize, sortType, orderType);
		Specification<NotifyFile> spec = buildSpecification(searchParams);

		return notifyFileDao.findAll(spec, pageRequest);
	}

	*//**
	 * 创建动态查询条件组合.
	 *//*
	private Specification<NotifyFile> buildSpecification(Map<String, Object> searchParams) {
		Map<String, KLSearchFilter> filters = KLSearchFilter.parse(searchParams);
		Specification<NotifyFile> spec = KLDynamicSpecifications.byKLSearchFilter(filters.values(), NotifyFile.class);
		return spec;
	}

	@Autowired
	public void setNotifyFileDao(NotifyFileDao notifyFileDao) {
		this.notifyFileDao = notifyFileDao;
	}
*/
}
